cmake_minimum_required(VERSION 3.20)

# 设置项目名称
project(Security
        LANGUAGES CXX
        VERSION 0.1.0)

add_library(${PROJECT_NAME} SHARED LicenseCheck.cpp)

# 加入授权检测
import_licensecc()

find_package(Boost REQUIRED COMPONENTS filesystem)

target_link_libraries(${PROJECT_NAME} PRIVATE Boost::boost Boost::filesystem)

# Header files install
install(
  DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  DESTINATION include/Utility
  FILES_MATCHING
  PATTERN "*.h")
  
# 安装目标
install(
  TARGETS ${PROJECT_NAME}
  ARCHIVE DESTINATION lib
  LIBRARY DESTINATION lib
  RUNTIME DESTINATION bin)